package org.aeon.client.handler.Inbound;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.aeon.client.view.components.menuPanel.PopupPrompt;
import org.aeon.message.response.FriendAddResponseMessage;

/**
 * @author: MissingAeon
 * @date: 2024/1/29 15:34
 * @description: 好友请求响应处理
 */
@Slf4j
@ChannelHandler.Sharable
public class FriendAddResponseHandler extends SimpleChannelInboundHandler<FriendAddResponseMessage> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, FriendAddResponseMessage msg) throws Exception {
        PopupPrompt.createPopUp(msg.getReason());
        log.debug(msg.getReason());
    }
}
